#ifndef __HARDWAREINTERFACE_H
#define __HARDWAREINTERFACE_H
#include <stdint.h>

#include "IMUTask.h"
#include "zf_device_imu963ra.h"
#include "Controller.h"

#ifndef PI
#define PI (3.1415926535898)
#endif

#define TRANSMITTER 0 // 发送器，0为WiFi，1为串口

#if (TRANSMITTER)
#define ANO_USE_UART UART_0
#define ANO_USE_BAUD 115200 // 800000
//#define ANO_USE_BAUD 800000 // 800000
#define ANO_USE_TX UART0_TX_P14_0
#define ANO_UES_RX UART0_RX_P14_1
#else

#endif

void AnoPTv8HwSendBytes(uint8_t *buf, uint16_t len);
void AnoPTv8HwRecvByte(uint8_t dat);
void AnoPTv8HwTrigger1ms(void);
uint8_t AnoPTv8HwInit(void);

void AnoPTv8HwParValRecvCallback(uint16_t parid, void * parval);
void AnoPTv8HwParCmdRecvCallback(uint8_t id, uint16_t val);
void AnoPTv8HwParCmdResetParameter(void);
void AnoPTv8HwParCmdResetAccCal(void);
void AnoPTv8HwParCmdResetMagCal(void);
void AnoPTv8HwParCmdFinishAccCal(void);
void AnoPTv8HwParCmdFinishMagCal(void);
#endif
